<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArLaserConnector Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArLaserConnector.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArLaserConnector-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArLaserConnector Class Reference<div class="ingroups"><a class="el" href="group__ImportantClasses.html">Important Classes</a> &#124; <a class="el" href="group__DeviceClasses.html">Device Interface Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based on parameters from robot parameter file and command-line arguments.  
 <a href="classArLaserConnector.html#details">More...</a></p>

<p><code>#include &lt;ArLaserConnector.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector_1_1LaserData.html">LaserData</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Class that holds information about the laser data.  <a href="classArLaserConnector_1_1LaserData.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a56f7cd0494ca739b156c7fb40481c154"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a56f7cd0494ca739b156c7fb40481c154">addLaser</a> (<a class="el" href="classArLaser.html">ArLaser</a> *laser, int laserNumber=1)</td></tr>
<tr class="memdesc:a56f7cd0494ca739b156c7fb40481c154"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a laser so parsing will get it.  <a href="#a56f7cd0494ca739b156c7fb40481c154">More...</a><br /></td></tr>
<tr class="separator:a56f7cd0494ca739b156c7fb40481c154"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d3a60cee41aeb9cf635f17e8530b114"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a5d3a60cee41aeb9cf635f17e8530b114">addPlaceholderLaser</a> (<a class="el" href="classArLaser.html">ArLaser</a> *placeholderLaser, int laserNumber=1, bool takeOwnershipOfPlaceholder=false)</td></tr>
<tr class="memdesc:a5d3a60cee41aeb9cf635f17e8530b114"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a laser for parsing but where connectLaser will be called later.  <a href="#a5d3a60cee41aeb9cf635f17e8530b114">More...</a><br /></td></tr>
<tr class="separator:a5d3a60cee41aeb9cf635f17e8530b114"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a5f821d02aee9232e6efc0e8defa39a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a6a5f821d02aee9232e6efc0e8defa39a">ArLaserConnector</a> (<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *parser, <a class="el" href="classArRobot.html">ArRobot</a> *robot, <a class="el" href="classArRobotConnector.html">ArRobotConnector</a> *robotConnector, bool autoParseArgs=true, <a class="el" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3">ArLog::LogLevel</a> infoLogLevel=<a class="el" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a6e80d09c67dad73e9ba736e91ec893be">ArLog::Verbose</a>, <a class="el" href="classArRetFunctor1.html">ArRetFunctor1</a>&lt; bool, const char * &gt; *turnOnPowerOutputCB=NULL, <a class="el" href="classArRetFunctor1.html">ArRetFunctor1</a>&lt; bool, const char * &gt; *turnOffPowerOutputCB=NULL)</td></tr>
<tr class="memdesc:a6a5f821d02aee9232e6efc0e8defa39a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that takes argument parser.  <a href="#a6a5f821d02aee9232e6efc0e8defa39a">More...</a><br /></td></tr>
<tr class="separator:a6a5f821d02aee9232e6efc0e8defa39a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64a2572b43a50830c91b32cbe2f06377"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a64a2572b43a50830c91b32cbe2f06377">connectLaser</a> (<a class="el" href="classArLaser.html">ArLaser</a> *laser, int laserNumber=1, bool forceConnection=true)</td></tr>
<tr class="memdesc:a64a2572b43a50830c91b32cbe2f06377"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects the laser synchronously (will take up to a minute)  <a href="#a64a2572b43a50830c91b32cbe2f06377">More...</a><br /></td></tr>
<tr class="separator:a64a2572b43a50830c91b32cbe2f06377"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab97ce6a5fedebf44526773bc674b970e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#ab97ce6a5fedebf44526773bc674b970e">connectLasers</a> (bool continueOnFailedConnect=false, bool addConnectedLasersToRobot=true, bool addAllLasersToRobot=false, bool turnOnLasers=true, bool powerCycleLaserOnFailedConnect=true, int *failedOnLaser=NULL)</td></tr>
<tr class="memdesc:ab97ce6a5fedebf44526773bc674b970e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects all the lasers the robot has that should be auto connected.  <a href="#ab97ce6a5fedebf44526773bc674b970e">More...</a><br /></td></tr>
<tr class="separator:ab97ce6a5fedebf44526773bc674b970e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6beda0c6c5a45092dae687b94110a7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6beda0c6c5a45092dae687b94110a7f"></a>
<a class="el" href="classArLaser.html">ArLaser</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#ae6beda0c6c5a45092dae687b94110a7f">getLaser</a> (int laserNumber)</td></tr>
<tr class="memdesc:ae6beda0c6c5a45092dae687b94110a7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal function to get the laser (only useful between parseArgs and connectLasers) <br /></td></tr>
<tr class="separator:ae6beda0c6c5a45092dae687b94110a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60d4485340c08e6faf6745df23804b20"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60d4485340c08e6faf6745df23804b20"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a60d4485340c08e6faf6745df23804b20">logLaserData</a> ()</td></tr>
<tr class="memdesc:a60d4485340c08e6faf6745df23804b20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log all currently set paramter values. <br /></td></tr>
<tr class="separator:a60d4485340c08e6faf6745df23804b20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2269b39b5c02bfc2b38eb96fd6c89558"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2269b39b5c02bfc2b38eb96fd6c89558"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a2269b39b5c02bfc2b38eb96fd6c89558">logOptions</a> (void) const </td></tr>
<tr class="memdesc:a2269b39b5c02bfc2b38eb96fd6c89558"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log the command-line options available to the user. <br /></td></tr>
<tr class="separator:a2269b39b5c02bfc2b38eb96fd6c89558"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a710b647a8bec2df3ecd07758657648d1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a710b647a8bec2df3ecd07758657648d1">parseArgs</a> (void)</td></tr>
<tr class="memdesc:a710b647a8bec2df3ecd07758657648d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to parse the arguments given in the constructor.  <a href="#a710b647a8bec2df3ecd07758657648d1">More...</a><br /></td></tr>
<tr class="separator:a710b647a8bec2df3ecd07758657648d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc9bd203df03476e0e53c00f54539d62"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#acc9bd203df03476e0e53c00f54539d62">parseArgs</a> (<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *parser)</td></tr>
<tr class="memdesc:acc9bd203df03476e0e53c00f54539d62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to parse the arguments given in an arbitrary parser.  <a href="#acc9bd203df03476e0e53c00f54539d62">More...</a><br /></td></tr>
<tr class="separator:acc9bd203df03476e0e53c00f54539d62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7508f51488da99dc40d1927f491254d9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7508f51488da99dc40d1927f491254d9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a7508f51488da99dc40d1927f491254d9">replaceLaser</a> (<a class="el" href="classArLaser.html">ArLaser</a> *laser, int laserNumber)</td></tr>
<tr class="memdesc:a7508f51488da99dc40d1927f491254d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal function to replace the laser (only useful between parseArgs and connectLasers) but not the laser data. <br /></td></tr>
<tr class="separator:a7508f51488da99dc40d1927f491254d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb397c8907a2aef78363fbdc2ac6b0b5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#afb397c8907a2aef78363fbdc2ac6b0b5">setupLaser</a> (<a class="el" href="classArLaser.html">ArLaser</a> *laser, int laserNumber=1)</td></tr>
<tr class="memdesc:afb397c8907a2aef78363fbdc2ac6b0b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up a laser to be connected.  <a href="#afb397c8907a2aef78363fbdc2ac6b0b5">More...</a><br /></td></tr>
<tr class="separator:afb397c8907a2aef78363fbdc2ac6b0b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aceceb24f39adc2383fe2fd6d4d715994"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aceceb24f39adc2383fe2fd6d4d715994"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#aceceb24f39adc2383fe2fd6d4d715994">~ArLaserConnector</a> (void)</td></tr>
<tr class="memdesc:aceceb24f39adc2383fe2fd6d4d715994"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:aceceb24f39adc2383fe2fd6d4d715994"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a47b0cb6800a77d7ed7c8c76709c0a51b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a47b0cb6800a77d7ed7c8c76709c0a51b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>internalConfigureLaser</b> (<a class="el" href="classArLaserConnector_1_1LaserData.html">LaserData</a> *laserData)</td></tr>
<tr class="separator:a47b0cb6800a77d7ed7c8c76709c0a51b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1beb3dd1ff246bb15e06c99c2a3ebda4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1beb3dd1ff246bb15e06c99c2a3ebda4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a1beb3dd1ff246bb15e06c99c2a3ebda4">logLaserOptions</a> (<a class="el" href="classArLaserConnector_1_1LaserData.html">LaserData</a> *laserdata, bool header=true, bool metaOpts=true) const </td></tr>
<tr class="memdesc:a1beb3dd1ff246bb15e06c99c2a3ebda4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Logs the laser command line option help text. <br /></td></tr>
<tr class="separator:a1beb3dd1ff246bb15e06c99c2a3ebda4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84a3ba2df666ea534f6fd6fb2210e430"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84a3ba2df666ea534f6fd6fb2210e430"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLaserConnector.html#a84a3ba2df666ea534f6fd6fb2210e430">parseLaserArgs</a> (<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *parser, <a class="el" href="classArLaserConnector_1_1LaserData.html">LaserData</a> *laserData)</td></tr>
<tr class="memdesc:a84a3ba2df666ea534f6fd6fb2210e430"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses the laser arguments. <br /></td></tr>
<tr class="separator:a84a3ba2df666ea534f6fd6fb2210e430"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:af29961b33fd7c8d6744f14eeec8a1e58"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af29961b33fd7c8d6744f14eeec8a1e58"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myAutoParseArgs</b></td></tr>
<tr class="separator:af29961b33fd7c8d6744f14eeec8a1e58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96ddbf68d016c6d599dda5f63b484bd4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96ddbf68d016c6d599dda5f63b484bd4"></a>
<a class="el" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3">ArLog::LogLevel</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myInfoLogLevel</b></td></tr>
<tr class="separator:a96ddbf68d016c6d599dda5f63b484bd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92271f7a0875caea0ee19799052c5396"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a92271f7a0875caea0ee19799052c5396"></a>
std::map&lt; int, <a class="el" href="classArLaserConnector_1_1LaserData.html">LaserData</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myLasers</b></td></tr>
<tr class="separator:a92271f7a0875caea0ee19799052c5396"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5856a6d7bdb8894953f6615e6f9de2a6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5856a6d7bdb8894953f6615e6f9de2a6"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myLaserTypes</b></td></tr>
<tr class="separator:a5856a6d7bdb8894953f6615e6f9de2a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60cce2c5da61b95c6fea2b35ad636432"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60cce2c5da61b95c6fea2b35ad636432"></a>
<a class="el" href="classArConstFunctorC.html">ArConstFunctorC</a>&lt; <a class="el" href="classArLaserConnector.html">ArLaserConnector</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myLogOptionsCB</b></td></tr>
<tr class="separator:a60cce2c5da61b95c6fea2b35ad636432"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04271673aed9a8ce61d1a8ace0c74a0a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a04271673aed9a8ce61d1a8ace0c74a0a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myOwnParser</b></td></tr>
<tr class="separator:a04271673aed9a8ce61d1a8ace0c74a0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb7c5c069df89048dbb891f40fe1fc26"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb7c5c069df89048dbb891f40fe1fc26"></a>
<a class="el" href="classArRetFunctorC.html">ArRetFunctorC</a>&lt; bool, <a class="el" href="classArLaserConnector.html">ArLaserConnector</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myParseArgsCB</b></td></tr>
<tr class="separator:abb7c5c069df89048dbb891f40fe1fc26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb83b4d7e88404486fbb2513287fce50"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb83b4d7e88404486fbb2513287fce50"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myParsedArgs</b></td></tr>
<tr class="separator:afb83b4d7e88404486fbb2513287fce50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5547a5d6d85403b0b79b5110aa473fd2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5547a5d6d85403b0b79b5110aa473fd2"></a>
<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myParser</b></td></tr>
<tr class="separator:a5547a5d6d85403b0b79b5110aa473fd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbfb24edb82f2d6007c2ecfa6b5987c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acbfb24edb82f2d6007c2ecfa6b5987c1"></a>
<a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myRobot</b></td></tr>
<tr class="separator:acbfb24edb82f2d6007c2ecfa6b5987c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9421f1f98a9c8e00937cc8ab55fb7a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9421f1f98a9c8e00937cc8ab55fb7a7"></a>
<a class="el" href="classArRobotConnector.html">ArRobotConnector</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myRobotConnector</b></td></tr>
<tr class="separator:ab9421f1f98a9c8e00937cc8ab55fb7a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5d9a2fc4cfa3c247a8d33919bc4719f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5d9a2fc4cfa3c247a8d33919bc4719f"></a>
<a class="el" href="classArRetFunctor1.html">ArRetFunctor1</a>&lt; bool, const char * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>myTurnOffPowerOutputCB</b></td></tr>
<tr class="separator:ac5d9a2fc4cfa3c247a8d33919bc4719f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e13355ff6395be723c9dbe7fc8c5786"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e13355ff6395be723c9dbe7fc8c5786"></a>
<a class="el" href="classArRetFunctor1.html">ArRetFunctor1</a>&lt; bool, const char * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>myTurnOnPowerOutputCB</b></td></tr>
<tr class="separator:a6e13355ff6395be723c9dbe7fc8c5786"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based on parameters from robot parameter file and command-line arguments. </p>
<p><a class="el" href="classArLaserConnector.html" title="Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based ...">ArLaserConnector</a> makes a laser connection (e.g. through serial port, TCP network connection, or to simulator connection as a special case if the robot connection is to a simulator.) Parameters are configurable through command-line arguments or in the robot parameter file.</p>
<p>When you create your <a class="el" href="classArLaserConnector.html" title="Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based ...">ArLaserConnector</a>, pass it command line parameters via either the argc and argv variables from main(), or pass it an <a class="el" href="classArArgumentBuilder.html" title="This class is to build arguments for things that require argc and argv. ">ArArgumentBuilder</a> or <a class="el" href="classArArgumentParser.html" title="Parse and store program command-line arguments for use by other ARIA classes. ">ArArgumentParser</a> object. (<a class="el" href="classArArgumentBuilder.html" title="This class is to build arguments for things that require argc and argv. ">ArArgumentBuilder</a> is able to obtain command line parameters from a Windows program that uses WinMain() instead of main()). <a class="el" href="classArLaserConnector.html" title="Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based ...">ArLaserConnector</a> registers a callback with the global <a class="el" href="classAria.html" title="Contains global initialization, deinitialization and other global functions. ">Aria</a> class. Use <a class="el" href="classAria.html#a1b090c01d88bb420b8cf8e0384d25ee1" title="Parses the arguments for the program (calls all the callbacks added with addParseArgsCB()) ...">Aria::parseArgs()</a> to parse all command line parameters to the program, and <a class="el" href="classAria.html#a10d71f3d4d0cf7f38c58a1f749f64a42" title="Logs all the options for the program (Calls all the callbacks added with addLogOptionsCB()) ...">Aria::logOptions()</a> to print out information about all registered command-line parameters. <a class="el" href="classArLaserConnector.html" title="Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based ...">ArLaserConnector</a> will be included in these.</p>
<p>Then, to connect to any lasers that were set up in the robot parameter file or via command line arguments, call <a class="el" href="classArLaserConnector.html#ab97ce6a5fedebf44526773bc674b970e" title="Connects all the lasers the robot has that should be auto connected. ">connectLasers()</a>. If successful, <a class="el" href="classArLaserConnector.html#ab97ce6a5fedebf44526773bc674b970e" title="Connects all the lasers the robot has that should be auto connected. ">connectLasers()</a> will return true and add an entry for each laser connected in the <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> object's list of lasers. These <a class="el" href="classArLaser.html" title="ArRangeDevice interface specialized for laser rangefinder sensors; see ArRangeDevice for more data ac...">ArLaser</a> objects can be accessed from your <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> object via <a class="el" href="classArRobot.html#a6078092b71a4e521bbc8f0cb5c92da46" title="Finds a laser in the robot&#39;s list (laserNumber indices start at 1) ">ArRobot::findLaser()</a> or <a class="el" href="classArRobot.html#a62ad0a5f2cc0973f08f8d85bea1d5d7b" title="Gets the range device list. ">ArRobot::getLaserMap()</a>.</p>
<p>(The internal interface used by ARIA to connect to configured lasers and add them to <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> is also available if you need to use it: See <a class="el" href="classArLaserConnector.html#a56f7cd0494ca739b156c7fb40481c154" title="Adds a laser so parsing will get it. ">addLaser()</a>; but this is normally not neccesary for almost all cases.)</p>
<p>The following command-line arguments are checked: </p><pre class="fragment">Laser types and options may also be set in the robot parameter file.  See the
ARIA reference documentation for details.

If a program supports multiple lasers, then options for additional lasers
after the first are given by appending the laser number (e.g. -laserType2)
To enable use of a laser, choose its type with the -laserType&lt;N&gt; options
(e.g.: -laserType lms2xx -laserType2 urg2.0)

The default laser type for the primary laser (laser 1) is specified in the
robot type parameter file in the ARIA "params" directory. For many robots
it is "lms2xx", the SICK LMS200. For some it is "lms1xx", for the SICK
LMS100 or LMS111.

Instruct a program to connect to a laser using the -connectLaser&lt;N&gt; option
or by setting LaserAutoConnect to true in the robot's parameter file.
If a program requires use of a laser it usually always attempts to connect to
the primary laser, however.

The index number is optional in any options for the primary laser; i.e. 1 is
assumed if the index number is omitted.



For laser type "lms2xx" (SICK LMS-200):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 32000
-laserDegrees &lt;100|180&gt;
-ld &lt;100|180&gt;
-laserIncrement &lt;half|one&gt;
-li &lt;half|one&gt;
-laserUnits &lt;1mm|1cm|10cm&gt;
-lu &lt;1mm|1cm|10cm&gt;
-laserReflectorBits &lt;1ref|2ref|3ref&gt;
-lrb &lt;1ref|2ref|3ref&gt;
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserStartingBaud &lt;9600|19200|38400&gt;
-lsb &lt;9600|19200|38400&gt;
-laserAutoBaud &lt;9600|19200|38400&gt;
-lab &lt;9600|19200|38400&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "lms1xx" (SICK LMS-100, LMS-111, etc.):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 50000
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -135 and 135
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between -135 and 135
-laserIncrement &lt;half|quarter&gt;
-li &lt;half|quarter&gt;
-laserReflectorBits &lt;none|8bits&gt;
-lrb &lt;none|8bits&gt;
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "urg2.0" (URG with SCIP 2.0):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 262144
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -180 and 180
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between -180 and 180
-laserIncrementByDegrees &lt;incrementByDegrees&gt;
-libd &lt;incrementByDegrees&gt;
	&lt;incrementByDegrees&gt; is a double between 0 and 180
-laserStartingBaud &lt;0|019200|057600|115200|250000|500000|750000&gt;
-lsb &lt;0|019200|057600|115200|250000|500000|750000&gt;
-laserAutoBaud &lt;0|019200|057600|115200|250000|500000|750000&gt;
-lab &lt;0|019200|057600|115200|250000|500000|750000&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "urg" (URG with old SCIP 1.0):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 4095
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -135 and 135
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between -135 and 135
-laserIncrementByDegrees &lt;incrementByDegrees&gt;
-libd &lt;incrementByDegrees&gt;
	&lt;incrementByDegrees&gt; is a double between 0 and 135
-laserStartingBaud &lt;019200|057600|115200|250000|500000|750000&gt;
-lsb &lt;019200|057600|115200|250000|500000|750000&gt;
-laserAutoBaud &lt;019200|057600|115200|250000|500000|750000&gt;
-lab &lt;019200|057600|115200|250000|500000|750000&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "lms5XX" (SICK LMS-500):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 80000
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -95 and 95
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between -95 and 95
-laserIncrement &lt;half|one|quarter&gt;
-li &lt;half|one|quarter&gt;
-laserReflectorBits &lt;none|8bits&gt;
-lrb &lt;none|8bits&gt;
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "sZseries" (Keyence SZ):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 16382
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -135 and -135
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between 135 and 135
-laserIncrementByDegrees &lt;incrementByDegrees&gt;
-libd &lt;incrementByDegrees&gt;
	&lt;incrementByDegrees&gt; is a double between 0.5 and 0.5
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserStartingBaud &lt;9600|19200|38400|57600|115200|230400|460800&gt;
-lsb &lt;9600|19200|38400|57600|115200|230400|460800&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "s3series" (SICK S-300, S-3000, etc.):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 20000
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -135 and -135
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between 135 and 135
-laserIncrement &lt;half&gt;
-li &lt;half&gt;
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserStartingBaud &lt;9600|19200|38400|57600|115200|230400|460800&gt;
-lsb &lt;9600|19200|38400|57600|115200|230400|460800&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "tim510" or "tim3XX" (SICK TiM310 and TiM510):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 4000
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -135 and 135
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between -135 and 135
-laserIncrement &lt;three&gt;
-li &lt;three&gt;
-laserReflectorBits &lt;none|8bits&gt;
-lrb &lt;none|8bits&gt;
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserStartingBaud &lt;115200&gt;
-lsb &lt;115200&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "tim551" (SICK TiM551):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 10000
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -135 and 135
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between -135 and 135
-laserIncrement &lt;one&gt;
-li &lt;one&gt;
-laserReflectorBits &lt;none|8bits&gt;
-lrb &lt;none|8bits&gt;
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "tim561" (SICK TiM561):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 10000
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -135 and 135
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between -135 and 135
-laserIncrement &lt;one&gt;
-li &lt;one&gt;
-laserReflectorBits &lt;none|8bits&gt;
-lrb &lt;none|8bits&gt;
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'

For laser type "tim571" (SICK TiM571):

-laserPort &lt;laserPort&gt;
-lp &lt;laserPort&gt;
-laserPortType &lt;serial|serial422|tcp&gt;
-lpt &lt;serial|serial422|tcp&gt;
-remoteLaserTcpPort &lt;remoteLaserTcpPort&gt;
-rltp &lt;remoteLaserTcpPort&gt;
-laserFlipped &lt;true|false&gt;
-lf &lt;true|false&gt;
-laserMaxRange &lt;maxRange&gt;
-lmr &lt;maxRange&gt;
	&lt;maxRange&gt; is an unsigned int less than 25000
-laserDegreesStart &lt;startAngle&gt;
-lds &lt;startAngle&gt;
	&lt;startAngle&gt; is a double between -135 and 135
-laserDegreesEnd &lt;endAngle&gt;
-lde &lt;endAngle&gt;
	&lt;endAngle&gt; is a double between -135 and 135
-laserIncrement &lt;third&gt;
-li &lt;third&gt;
-laserReflectorBits &lt;none|8bits&gt;
-lrb &lt;none|8bits&gt;
-laserPowerControlled &lt;true|false&gt;
-lpc &lt;true|false&gt;
-laserAdditionalIgnoreReadings &lt;readings&gt;
-lair &lt;readings&gt;
	&lt;readings&gt; is a string that contains readings to ignore separated by commas, where ranges are acceptable with a -, example '75,76,90-100,-75,-76,-90--100'
</pre><dl class="section since"><dt>Since</dt><dd>2.7.0 </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="actsColorFollowingExample_8cpp-example.html#_a24">actsColorFollowingExample.cpp</a>, <a class="el" href="demo_8cpp-example.html#_a19">demo.cpp</a>, <a class="el" href="gotoActionExample_8cpp-example.html#_a7">gotoActionExample.cpp</a>, <a class="el" href="gpsRobotTaskExample_8cpp-example.html#_a11">gpsRobotTaskExample.cpp</a>, <a class="el" href="laserConnect_8cpp-example.html#_a5">laserConnect.cpp</a>, <a class="el" href="lasers_8cpp-example.html#_a5">lasers.cpp</a>, <a class="el" href="lineFinderExample_8cpp-example.html#_a5">lineFinderExample.cpp</a>, <a class="el" href="triangleDriveToActionExample_8cpp-example.html#_a5">triangleDriveToActionExample.cpp</a>, and <a class="el" href="wander_8cpp-example.html#_a5">wander.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6a5f821d02aee9232e6efc0e8defa39a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArLaserConnector::ArLaserConnector </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *&#160;</td>
          <td class="paramname"><em>parser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td>
          <td class="paramname"><em>robot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArRobotConnector.html">ArRobotConnector</a> *&#160;</td>
          <td class="paramname"><em>robotConnector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>autoParseArgs</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3">ArLog::LogLevel</a>&#160;</td>
          <td class="paramname"><em>infoLogLevel</em> = <code><a class="el" href="classArLog.html#ac8cc0fb3aa323ab2a1c21340fdd1dce3a6e80d09c67dad73e9ba736e91ec893be">ArLog::Verbose</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArRetFunctor1.html">ArRetFunctor1</a>&lt; bool, const char * &gt; *&#160;</td>
          <td class="paramname"><em>turnOnPowerOutputCB</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArRetFunctor1.html">ArRetFunctor1</a>&lt; bool, const char * &gt; *&#160;</td>
          <td class="paramname"><em>turnOffPowerOutputCB</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor that takes argument parser. </p>
<dl class="section warning"><dt>Warning</dt><dd>do not delete <em>parser</em> during the lifetime of this <a class="el" href="classArLaserConnector.html" title="Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based ...">ArLaserConnector</a>, which may need to access its contents later.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parser</td><td>the parser with the arguments to parse</td></tr>
    <tr><td class="paramname">robot</td><td>the robot these lasers are attached to (or NULL for none)</td></tr>
    <tr><td class="paramname">robotConnector</td><td>the connector used for connecting to the robot (so we can see if it was a sim or not)</td></tr>
    <tr><td class="paramname">autoParseArgs</td><td>if this class should autoparse the args if they aren't parsed explicitly</td></tr>
    <tr><td class="paramname">infoLogLevel</td><td>The log level for information about creating lasers and such, this is also passed to all the lasers created as their infoLogLevel too</td></tr>
    <tr><td class="paramname">turnOnPowerOutputCB</td><td>If not NULL, may be invoked to turn on laser power if neccesary. </td></tr>
    <tr><td class="paramname">turnOffPowerOutputCB</td><td>If not NULL, may be invoked to turn off laser power if neccesary. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a56f7cd0494ca739b156c7fb40481c154"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArLaserConnector::addLaser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArLaser.html">ArLaser</a> *&#160;</td>
          <td class="paramname"><em>laser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>laserNumber</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a laser so parsing will get it. </p>
<p>Normally adding lasers is done from the .p file, you can use this if you want to add them explicitly in a program (which will override the .p file, and may cause some problems).</p>
<p>This is mainly for backwards compatibility (ie used for <a class="el" href="classArSimpleConnector.html" title="Legacy connector for robot and laser. ">ArSimpleConnector</a>). If you're using this class you should probably use the new functionality which is just <a class="el" href="classArLaserConnector.html#ab97ce6a5fedebf44526773bc674b970e" title="Connects all the lasers the robot has that should be auto connected. ">ArLaserConnector::connectLasers</a>.() </p>

</div>
</div>
<a class="anchor" id="a5d3a60cee41aeb9cf635f17e8530b114"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArLaserConnector::addPlaceholderLaser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArLaser.html">ArLaser</a> *&#160;</td>
          <td class="paramname"><em>placeholderLaser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>laserNumber</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>takeOwnershipOfPlaceholder</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a laser for parsing but where connectLaser will be called later. </p>
<p>Normally adding lasers is done from the .p file, you can use this if you want to add them explicitly in a program (which will override the .p file, and may cause some problems).</p>
<p>This is only for backwards compatibility (ie used for <a class="el" href="classArSimpleConnector.html" title="Legacy connector for robot and laser. ">ArSimpleConnector</a>). If you're using this class you should probably use the new functionality which is just <a class="el" href="classArLaserConnector.html#ab97ce6a5fedebf44526773bc674b970e" title="Connects all the lasers the robot has that should be auto connected. ">ArLaserConnector::connectLasers()</a>. </p>

</div>
</div>
<a class="anchor" id="a64a2572b43a50830c91b32cbe2f06377"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArLaserConnector::connectLaser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArLaser.html">ArLaser</a> *&#160;</td>
          <td class="paramname"><em>laser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>laserNumber</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>forceConnection</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connects the laser synchronously (will take up to a minute) </p>
<p>This is mainly for backwards compatibility (ie used for <a class="el" href="classArSimpleConnector.html" title="Legacy connector for robot and laser. ">ArSimpleConnector</a>).</p>
<p>If you're using this class you should probably use the new functionality which is just <a class="el" href="classArLaserConnector.html#ab97ce6a5fedebf44526773bc674b970e" title="Connects all the lasers the robot has that should be auto connected. ">ArLaserConnector::connectLasers()</a>. </p>

</div>
</div>
<a class="anchor" id="ab97ce6a5fedebf44526773bc674b970e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArLaserConnector::connectLasers </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>continueOnFailedConnect</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>addConnectedLasersToRobot</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>addAllLasersToRobot</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>turnOnLasers</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>powerCycleLaserOnFailedConnect</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>failedOnLaser</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connects all the lasers the robot has that should be auto connected. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">continueOnFailedConnect</td><td>whether to continue on a failed connection or not</td></tr>
    <tr><td class="paramname">addConnectedLasersToRobot</td><td>whether to add connected lasers to the list stored in <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a>. Normally this should be left as true.</td></tr>
    <tr><td class="paramname">addAllLasersToRobot</td><td>whether to add all the lasers to the <a class="el" href="classArRobot.html" title="Central class for communicating with and operating the robot. ">ArRobot</a> list or not (even if connection was not made to that laser).</td></tr>
    <tr><td class="paramname">turnOnLasers</td><td>whether to attempt to turn on power to the laser (by sending commands to the robot microcontroller).</td></tr>
    <tr><td class="paramname">powerCycleLaserOnFailedConnect</td><td>whether to turn on the laser (with the microcontroller commands)</td></tr>
    <tr><td class="paramname">failedOnLaser</td><td>If this pointer is valid then the function will set the index of the first laser where connection failed, or -1 if there was an internal failure before attempting to connect to any lasers (for example, parsing program arguments). The function will also return false. If NULL, ignored.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful connecting to lasers, false on any errors. </dd></dl>
<p>TODO see if this firmware can actually do the power cycling </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="actsColorFollowingExample_8cpp-example.html#a33">actsColorFollowingExample.cpp</a>, <a class="el" href="demo_8cpp-example.html#a28">demo.cpp</a>, <a class="el" href="gpsRobotTaskExample_8cpp-example.html#a21">gpsRobotTaskExample.cpp</a>, <a class="el" href="laserConnect_8cpp-example.html#a15">laserConnect.cpp</a>, <a class="el" href="lasers_8cpp-example.html#a15">lasers.cpp</a>, <a class="el" href="lineFinderExample_8cpp-example.html#a15">lineFinderExample.cpp</a>, <a class="el" href="triangleDriveToActionExample_8cpp-example.html#a14">triangleDriveToActionExample.cpp</a>, and <a class="el" href="wander_8cpp-example.html#a19">wander.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a710b647a8bec2df3ecd07758657648d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArLaserConnector::parseArgs </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to parse the arguments given in the constructor. </p>
<p>Parse command line arguments using the <a class="el" href="classArArgumentParser.html" title="Parse and store program command-line arguments for use by other ARIA classes. ">ArArgumentParser</a> given in the <a class="el" href="classArLaserConnector.html" title="Create laser interface objects (for any kind of laser supported by ARIA) and connect to lasers based ...">ArLaserConnector</a> constructor.</p>
<p>See <a class="el" href="classArLaserConnector.html#acc9bd203df03476e0e53c00f54539d62" title="Function to parse the arguments given in an arbitrary parser. ">parseArgs(ArArgumentParser*)</a> for details about argument parsing.</p>
<dl class="section return"><dt>Returns</dt><dd>true if the arguments were parsed successfully false if not </dd></dl>

</div>
</div>
<a class="anchor" id="acc9bd203df03476e0e53c00f54539d62"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArLaserConnector::parseArgs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *&#160;</td>
          <td class="paramname"><em>parser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to parse the arguments given in an arbitrary parser. </p>
<p>This function parses command line arguments held by the given <a class="el" href="classArArgumentParser.html" title="Parse and store program command-line arguments for use by other ARIA classes. ">ArArgumentParser</a>.</p>
<p>Normally, it is automatically called by ArArgumentParser::parseArgs().</p>
<dl class="section return"><dt>Returns</dt><dd>true if the arguments were parsed successfully false if not</dd></dl>
<p>The following arguments are accepted for laser connections. A program may request support for up to a specific number of lasers using setMaxNumLasers(); if multi-laser support is enabled in this way, then these arguments must have the laser index number appended. For example, "-laserPort" for laser 1 would instead by "-laserPort1", and for laser 2 it would be "-laserPort2".</p>
<dl>
<dt>-laserPort <em>port</em> </dt>
<dd></dd>
<dt>-lp <em>port</em> </dt>
<dd><p class="startdd">Use the given serial port device name when connecting to a laser. For example, <code>COM2</code> or on Linux, <code>/dev/ttyS1</code>. The default laser port is COM2, which is the typical Pioneer laser port. </p>
<p class="enddd"></p>
</dd>
<dt>-laserFlipped <em>true|false</em> </dt>
<dd></dd>
<dt>-lf <em>true|false</em> </dt>
<dd><p class="startdd">If <code>true</code>, then the laser is mounted upside-down on the robot and the ordering of readings should be reversed.</p>
<p class="enddd"></p>
</dd>
<dt>-connectLaser </dt>
<dd></dd>
<dt>-cl </dt>
<dd><p class="startdd">Explicitly request that the client program connect to a laser, if it does not always do so</p>
<p class="enddd"></p>
</dd>
<dt>-laserPowerControlled <em>true|false</em> </dt>
<dd></dd>
<dt>-lpc <em>true|false</em> </dt>
<dd><p class="startdd">If <code>true</code>, then the laser is powered on when the serial port is initially opened, so enable certain features when connecting such as a waiting period as the laser initializes.</p>
<p class="enddd"></p>
</dd>
<dt>-laserDegrees <em>degrees</em> </dt>
<dd></dd>
<dt>-ld <em>degrees</em> </dt>
<dd><p class="startdd">Indicate the size of the laser field of view, either <code>180</code> (default) or <code>100</code>.</p>
<p class="enddd"></p>
</dd>
<dt>-laserIncrement <em>increment</em> </dt>
<dd></dd>
<dt>-li <em>increment</em> </dt>
<dd><p class="startdd">Configures the laser's angular resolution. If <code>one</code>, then configure the laser to take a reading every degree. If <code>half</code>, then configure it for a reading every 1/2 degrees.</p>
<p class="enddd"></p>
</dd>
<dt>-laserUnits <em>units</em> </dt>
<dd></dd>
<dt>-lu <em>units</em> </dt>
<dd><p class="startdd">Configures the laser's range resolution. May be 1mm for one milimiter, 1cm for ten milimeters, or 10cm for one hundred milimeters.</p>
<p class="enddd"></p>
</dd>
<dt>-laserReflectorBits <em>bits</em> </dt>
<dd></dd>
<dt>-lrb <em>bits</em> </dt>
<dd>Enables special reflectance detection, and configures the granularity of reflector detection information. Using more bits allows the laser to provide values for several different reflectance levels, but also may force a reduction in range. (Note, the SICK LMS-200 only detects high reflectance on special reflector material manufactured by SICK.)  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afb397c8907a2aef78363fbdc2ac6b0b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArLaserConnector::setupLaser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArLaser.html">ArLaser</a> *&#160;</td>
          <td class="paramname"><em>laser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>laserNumber</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets up a laser to be connected. </p>
<p>This is mainly for backwards compatibility (ie used for <a class="el" href="classArSimpleConnector.html" title="Legacy connector for robot and laser. ">ArSimpleConnector</a>).</p>
<p>If you're using this class you should probably use the new functionality which is just <a class="el" href="classArLaserConnector.html#ab97ce6a5fedebf44526773bc674b970e" title="Connects all the lasers the robot has that should be auto connected. ">ArLaserConnector::connectLasers()</a>. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArLaserConnector.h</li>
<li>ArLaserConnector.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArLaserConnector.html">ArLaserConnector</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
